Page({
  data:{
    weeklyMovieList:[
      {
        name:"教父3",
        comment:"最精彩的剧本，最真实的黑帮电影。",
        imagePath:"/image/jf.jpg",
        isHighlyRecommended:true,
        id: 1291841
      },
      {
        name: "泰坦尼克号",
        comment: "失去的才是永恒的",
        imagePath: "/image/tt.jpg",
        isHighlyRecommended: true,
        id: 1292722
      },
      {
        name: "这个杀手不太冷",
        comment: "小萝莉与怪蜀黍纯真灿烂的爱情故事",
        imagePath: "/image/ss.jpg",
        isHighlyRecommended: true,
        id: 1295644
      }        
    ],
    count:123555,
    score:75,
    currentIndex:0
  },
  onLoad: function (options) {
    this.setData({
      currentIndex: this.data.weeklyMovieList.length - 1
    })
  },
f0: function (event) {
  /*console.log(this.data.count)*/
  this.setData({
    //count: this.data.count + 1,
    //"weeklyMovieList[2].name":"我被更改名字拉"
    currentIndex: this.data.weeklyMovieList.length - 1
  })
},
  f1: function (event) {
       //console.log(event.currentTarget)
    var movieId = event.currentTarget.dataset.movieId
   
    
    wx.navigateTo({
      url: '/pages/detail/detail?id=' + movieId
    })
  },

  onShareAppMessage: function(){
      return{
        title: "每周推荐"
      }
  },
  onShow: function() { },
  onReady: function () { },
  onHide: function () { },  
  onUnload: function () { },       
})